<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>比较成绩</title>
	<script type="text/javascript">
		var num1=Number(prompt('甲童鞋请输入你的分数：'));
		var num2=Number(prompt('乙童鞋请输入你的分数：'));
		if(num1<0||num2<0||num1>100||num2>100){
			console.log('请输入正确的分数！');
		}
		else if (num1>num2) {
			console.log('甲比乙高'+(num1-num2)+'分');
		}
		else if (num1=num2) {
			console.log('甲和乙考的一样高！');
		}
		else{
			console.log('乙比甲高'+(num2-num1)+'分');
		}
	</script>
</head>
<body>
	
</body>
</html>